package code;

import interfaces.*;

import java.util.*;

public class Controller {
	public LinkedList<Machine> machines = new LinkedList<Machine>();
	public OrderList orderList = new OrderListImpl();
	//public LinkedList<Order> orders = new LinkedList<Order>();
	public String drawingPath = "";
	
	public void newOrder(int id, int drawing, Date delivery){
		Order o = new OrderImpl(id, drawing, delivery);
		//orders.add(o);
		orderList.addOrder(o);
	}
	
	public void completeOrder(int id){
		//orders.remove(id);
		orderList.completeOrder(id);
	}
	
	public void completeOrder(Order o){
		//orders.remove(o);
		orderList.completeOrder(o);
	}
	
	public void setDrawingPath(String path){
		this.drawingPath = path;
	}
	
	public void changePriority(Order o, int newPos){
		orderList.changePriority(o, newPos);
		//orders = ((OrderListImpl) orderList).getList();
	}
}
